//
//  ProjectWaitingTableViewCell.m
//  work
//
//  Created by 徐宏飞 on 16/6/2.
//  Copyright © 2016年 方伟. All rights reserved.
//

#import "ProjectWaitingTableViewCell.h"
#import "AllProjectInfoModel.h"
#import "NSString+CZNSStringExt.h"

@interface ProjectWaitingTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *start_dat;
@property (weak, nonatomic) IBOutlet UILabel *end_day;
@property (weak, nonatomic) IBOutlet UILabel *makeOrder_day;
@property (weak, nonatomic) IBOutlet UILabel *lblAdd;
@property (weak, nonatomic) IBOutlet UILabel *lblPrice;
@property (weak, nonatomic) IBOutlet UILabel *lblNum;
@property (weak, nonatomic) IBOutlet UILabel *lblTotal;

@end


@implementation ProjectWaitingTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


//接单
- (IBAction)btnMakeJobAction:(id)sender {
    NSLog(@"接单");
    [self.delegate _waitingTableViewCellClick:0 order_id:_model.order_id];
    
}

//拒单
- (IBAction)btnRefuseJobAction:(id)sender {
    NSLog(@"拒单");
    [self.delegate _waitingTableViewCellClick:1 order_id:_model.order_id];
    
}

//平台协商
- (IBAction)btnNegotiationAction:(id)sender {
    NSLog(@"平台协商");
    [self.delegate _waitingTableViewCellClick:2 order_id:_model.order_id];
    
}

-(void)setModel:(AllProjectInfoModel *)model{
    _model = model;
    //开始时间
    _start_dat.text = [NSString stringWithFormat:@"%@", [NSString getBeijingDayWithStrTime:_model.start_day]];
    //结束时间
    _end_day.text = [NSString stringWithFormat:@"%@", [NSString getBeijingDayWithStrTime:_model.end_day]];
    //下单时间
    _makeOrder_day.text = [NSString stringWithFormat:@"%@", [NSString getBeijingDayWithStrTime:_model.create_time]];
    //地址
    _lblAdd.text = [NSString stringWithFormat:@"%@", _model.address];
    //
    _lblPrice.text = [NSString stringWithFormat:@"%@/平方", _model.price];
    //
    _lblNum.text = [NSString stringWithFormat:@"x%@/平方", _model.square];
    //
    _lblTotal.text = [NSString stringWithFormat:@"%@元", _model.amount];


}












@end
